package com.mes.basicdata.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bstek.dorado.annotation.DataProvider;
import com.mes.basicdata.manager.iface.ICalendarDataManager;
import com.mes.basicdata.dao.iface.ICalendarDataDao;
import com.mes.basicdata.domain.CalendarData;
import com.mes.common.service.BasicService;

@Service
public class CalendarDataService extends BasicService<CalendarData> {

	@Autowired
	private ICalendarDataDao calendarDataDao;
	
	@Autowired
	private ICalendarDataManager calendarDataManager;
	
	@DataProvider
	public List<CalendarData> getCalendarDataByCalendarUid(String calendarUid){
		if (calendarUid == null){
			return null;
		}
		
		try {
			//String calendarUid = (String) params.get("calendarUid");
			return calendarDataDao.findByProperty("calendarUid", calendarUid);
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}
}


